home *** CD-ROM | disk | FTP | other *** search
- // Standard select
- // forward declaration
- func Gui_Component NewSelect(Menu_Material _pFont, i32x _iX, i32x _iY, i32x _iSourceId,i32x _iReturnId);
- func Gui_Component NewSelectExt(Menu_Material _pFont, i32x _iX, i32x _iY, i32x _iSourceId,i32x _iReturnId,i32x _iSort,i32x _iShowList,i32x _iEditbox,i32x _iAlignX,i32x _iAlignY, f32x _fFontSize);
- func Gui_Component NewGroupOption(i32x _iWidth);
- func Gui_Component NewGroupOptionExt(i32x _iWidth,i32x _iOffsetX,i32x _iOffsetY);
-
- //Receiving messages
- message ShowSelectList();
- message HideSelectList();
- message SelectPrevious();
- message SelectNext();
-
- message AddOption(Gui_Component _gcOption);
- message SelectOption(i32x _iValue);
- message SelectNone (szx _szTxt); // select none of the objects, puts szTxt
-
- //Sending messages
- message QuietSelectIndex(Gui_Component _pSender,i32x _iIndex);
- message SelectIndex(Gui_Component _pSender,i32x _iIndex);
- message SelectInt(Gui_Component _pSender,i32x _iValue);
- message SelectFloat(Gui_Component _pSender,f32x _fValue);
- message SelectString(Gui_Component _pSender,szx _szValue);
-
- // Data class
- class Gui_dtSelect
- {
- var Gui_Component gcEditBox; // edit box
- var Gui_Component gcCaption; // caption
- var Gui_Component gcButtonClose; // button list close
- var Gui_Component gcButtonOpen; // button list open
- var Gui_Component gcList; // list
- var boolx bListHidden; // if list is visible => true; else => false
- var i32x iHeight;
- var i32x iSourceId;
- var i32x iReturnId;
- var boolx bSort;
- var boolx bQuiet;
- var i32x iRowSelected; // contain the row which is selected
- var i32x iShowList;
- var i32x iEditbox;
- };
- class Gui_dtGroupOption
- {
- var i32x iWidth; // GroupOption width
- var i32x iLastPosX; // Last item posX
- var i32x iLastPosY; // Last item posY
- var i32x iMaxY; // Last row max pos y
- var i32x iOffsetX; // offset X
- var i32x iOffsetY; // offset Y
- };
-
- // Predeclaration
- // event edit box
- /*
- func i32x Select_OnMouseClick(i32x _iX,i32x _iY,i32x _iButton);
- func void Select_OnKeyDown(i32x _iKey, i32x _iCount);
- func void Select_OnChar(szx _szChar,i32x _iCount);
- func i32x Select_OnGainFocus();
- func i32x Select_OnKeyUp(i32x _iKey);
- func i32x Select_OnMouseDown(i32x _iX,i32x _iY,i32x _iButton);
- func i32x Select_OnMouseUp(i32x _iX,i32x _iY,i32x _iButton);
- func i32x Select_OnMouseMove(i32x _iX,i32x _iY);
- func i32x Select_OnMouseDblClick(i32x _iX,i32x _iY,i32x _iButton);
- */
-
- func void Select_OnClick(Gui_Component _poComponent);
- func void Select_OnCellSelect(i32x _iRow);
- func void Select_ShowList();
- func void Select_HideList();
- func i32x Select_OnGainFocus();
- func i32x Select_OnLoseFocus();
-
- func i32x Select_OnSelectPrevious();
- func i32x Select_OnSelectNext();
- func i32x Select_OnQuietSelectIndex(Gui_Component _pSender,i32x _iIndex);
-
- func i32x Select_OnSelectNone (szx _szTxt);
- // Message handling interface
- interface Gui_iSelect
- {
- // Gui System Messages
- /* Select_OnMouseMove MouseMove;
- Select_OnMouseDown MouseDown;
- Select_OnMouseUp MouseUp;
- Select_OnMouseClick MouseClick;
- Select_OnMouseDblClick MouseDblClick;
- Select_OnKeyDown KeyDown;
- Select_OnChar Char;
- Select_OnKeyUp KeyUp;*/
- // Select_OnGainFocus GainFocus;
- Select_OnLoseFocus LoseFocus;
- Select_OnClick Click;
- Select_OnCellSelect CellSelect;
- Select_ShowList ShowSelectList;
- Select_HideList HideSelectList;
- Select_OnSelectPrevious SelectPrevious;
- Select_OnSelectNext SelectNext;
- Select_OnQuietSelectIndex QuietSelectIndex;
- Select_OnSelectNone SelectNone;
- }
-
- func void Group_AddOption(Gui_Component _gcOption);
- func void Group_SelectOption(i32x _iValue);
- func void Group_OnRadioCheck(Gui_Component _pComponent,i32x _iValue);
-
- interface Gui_iGroupOption
- {
- Group_AddOption AddOption;
- Group_SelectOption SelectOption;
- Group_OnRadioCheck RadioCheck;
- }
-
- /*
- * Function : Group option constructor with cursor
- * Parameters : _iX : maximum width
- */
- func Gui_Component NewGroupOption(i32x _iWidth)
- {
- var Gui_Component gcGroup;
- var i32x iOffsetX,iOffsetY;
- iOffsetX = 0;
- iOffsetY = 0;
- gcGroup = NewGroupOptionExt(_iWidth,iOffsetX,iOffsetY);
- return gcGroup;
- }
- func Gui_Component NewGroupOptionExt(i32x _iWidth,i32x _iOffsetX,i32x _iOffsetY)
- {
- var Gui_Component composite;
- var Gui_dtGroupOption pdtData;
-
- // Create an object that will contain Bitmap buton + caption
- composite = NewObject(Gui_iGroupOption);
- // Affect data pointer
- pdtData = new Gui_dtGroupOption;
- SetData(composite,pdtData);
-
- // members init
- pdtData.iLastPosX = 0;
- pdtData.iLastPosY = 0;
- pdtData.iOffsetX = _iOffsetX;
- pdtData.iOffsetY = _iOffsetY;
- pdtData.iMaxY = 0;
-
- // Stretch composite to width
- pdtData.iWidth = _iWidth;
- StretchTo(composite,_iWidth,0);
-
- // Make group option transparent
- Transparent(composite);
-
- return composite;
- }
-
- func void Group_AddOption(Gui_Component _gcOption)
- {
- var Gui_Component pthis,pparent;
- var Gui_dtGroupOption pdtData;
- var i32x id;
- var i32x px,py;
-
- // Retrieve group option pointer
- pthis = GetThis();
-
- // Retrieve data pointer
- pdtData = GetData(pthis);
-
- // Mount option inside group option
- id = MountComponent(pthis,_gcOption);
-
- // Calc option position
- px = pdtData.iLastPosX;
- py = pdtData.iLastPosY;
-
- // Next line ?
- if(px+SizeX(_gcOption)>pdtData.iWidth)
- {
- px = 0;
- py = pdtData.iMaxY + pdtData.iOffsetY;
- }
- // update Max y pos
- if(py + SizeY(_gcOption)>pdtData.iMaxY)
- {
- pdtData.iMaxY = py + SizeY(_gcOption);
- }
-
- // Move option to calculated pos
- MoveTo(_gcOption,px,py);
-
- pdtData.iLastPosX = px + SizeX(_gcOption) + pdtData.iOffsetX;
- pdtData.iLastPosY = py;
-
- // Stretch group option to fit height
- StretchTo(pthis,pdtData.iWidth,pdtData.iMaxY);
-
- // Send window content update
- pparent = GetParent(pthis);
- if(pparent)
- pparent<<WindowUpdate();
- }
- func void Group_SelectOption(i32x _iValue)
- {
- var Gui_Component pthis,pchild;
- var Gui_dtGroupOption pdtData;
- var i32x iNumComponents,i;
-
- // Retrieve group option pointer
- pthis = GetThis();
-
- // Retrieve data pointer
- pdtData = GetData(pthis);
-
- // Send update to each radio button
- iNumComponents = GetComponentNumber(pthis);
- i=0;
- while(i<iNumComponents)
- {
- pchild = GetComponent(pthis,i);
- if(pchild)
- {
- pchild<<QuietRadioCheck(_iValue);
- }
- i=i+1;
- }
- }
- func void Group_OnRadioCheck(Gui_Component _pComponent,i32x _iValue)
- {
- var Gui_Component pthis,pchild,parent;
- var Gui_dtGroupOption pdtData;
- var i32x iNumComponents,i;
-
- // Retrieve group option pointer
- pthis = GetThis();
-
- // Retrieve data pointer
- pdtData = GetData(pthis);
-
- // Send update to each radio button
- iNumComponents = GetComponentNumber(pthis);
- i=0;
- while(i<iNumComponents)
- {
- pchild = GetComponent(pthis,i);
- if(pchild)
- {
- if(pchild != _pComponent)
- {
- pchild<<QuietRadioCheck(_iValue);
- }
- }
- i=i+1;
- }
- parent = GetParent(pthis);
- if(parent) parent<<RadioCheck(pthis,_iValue);
- }
-
-
- /*
- * Function : Select constructor with cursor
- * Parameters : _pMaterial material pointer, _iX : width, _iY : height
- */
- func Gui_Component NewSelect(Menu_Material _pFont, i32x _iX, i32x _iY, i32x _iSourceId,i32x _iReturnId)
- {
- var i32x bSort;
- var i32x bShowList;
- var i32x bEditBox;
- var i32x eHAlign;
- var i32x eVAlign;
- var f32x fFontSize = 1.0;
-
- bSort = 0;
- bShowList = 1;
- bEditBox = 1;
- eHAlign = e_GUI_HAlign_Left;
- eVAlign = e_GUI_VAlign_Top;
-
- return NewSelectExt(_pFont,_iX,_iY,_iSourceId,_iReturnId,bSort,bShowList,bEditBox,eHAlign,eVAlign,fFontSize);
- }
- func Gui_Component NewSelectExt(Menu_Material _pFont, i32x _iX, i32x _iY, i32x _iSourceId,i32x _iReturnId,i32x _iSort,i32x _iShowList,i32x _iEditbox,i32x _iAlignX,i32x _iAlignY, f32x _fFontSize)
- {
- var Gui_Component composite;
- var Gui_dtSelect pdtSelect;
- var i32x sy_button, sx, sy_editbox;
- var f32x sy_move;
- var szx szValue;
-
- // Create an object that will contain Bitmap buton + caption
- composite = NewObject(Gui_iSelect);
- // Affect data pointer
- pdtSelect = new Gui_dtSelect;
- SetData(composite,pdtSelect);
-
- // Four component in composite select
- SetComponentNumber(composite,4);
-
- pdtSelect.bQuiet = false;
-
- //Editbox obtion
- pdtSelect.iEditbox=_iEditbox;
-
- //Showlist option
- pdtSelect.iShowList=_iShowList;
-
- // Create Button
- if(pdtSelect.iShowList)
- {
- // button list close
- pdtSelect.gcButtonClose = NewButtonDyn(smBtnListClose);
- sx = SizeX(pdtSelect.gcButtonClose);
- sy_button = SizeY(pdtSelect.gcButtonClose);
- StretchTo(pdtSelect.gcButtonClose,sx,sy_button);
- MountComponent(composite,pdtSelect.gcButtonClose);
- MoveTo(pdtSelect.gcButtonClose,_iX,0);
- SetAlign(pdtSelect.gcButtonClose,e_GUI_HAlign_Zoom,e_GUI_HAlign_Zoom);
-
- // button list open
- pdtSelect.gcButtonOpen = NewButtonDyn(smBtnListOpen);
- StretchTo(pdtSelect.gcButtonOpen,sx,sy_button);
- MountComponent(composite,pdtSelect.gcButtonOpen);
- MoveTo(pdtSelect.gcButtonOpen,_iX,0);
- pdtSelect.gcButtonOpen<<Hide();
- SetAlign(pdtSelect.gcButtonOpen,e_GUI_HAlign_Zoom,e_GUI_HAlign_Zoom);
- }
- else
- {
- sx=0;
- }
-
- // Create EditBox
- if(pdtSelect.iEditbox)
- {
- pdtSelect.gcEditBox = NewEditBoxExt(_pFont,cEBColor,_fFontSize);
- sy_editbox = SizeY(pdtSelect.gcEditBox);
- pdtSelect.gcEditBox<<EbCResize(_iX,sy_editbox);
- pdtSelect.gcEditBox<<EbCAlign(_iAlignX,_iAlignY);
- pdtSelect.gcEditBox<<Disable();
- MountComponent(composite,pdtSelect.gcEditBox);
- sy_move = (sy_button - sy_editbox) / 2;
- MoveTo(pdtSelect.gcEditBox,0,sy_move);
- }
- else
- {
- pdtSelect.gcCaption = NewCaption(_pFont,"");
- sy_editbox = SizeY(pdtSelect.gcCaption);
- SetAlign(pdtSelect.gcCaption,_iAlignX,_iAlignY);
- StretchTo(pdtSelect.gcCaption,_iX,sy_editbox);
- pdtSelect.gcCaption<<Disable();
- MountComponent(composite,pdtSelect.gcCaption);
- sy_move = (sy_button - sy_editbox) / 2;
- MoveTo(pdtSelect.gcCaption,0,sy_move);
- }
-
- // Init boolean
- pdtSelect.bListHidden = true;
- pdtSelect.bSort = _iSort;
-
- // init row
- pdtSelect.iRowSelected = 0;
-
- // Save SourceId
- pdtSelect.iSourceId = _iSourceId;
- pdtSelect.iReturnId = _iReturnId;
-
- // Init Edit Box
- if(Join_GetNumRows(pdtSelect.iSourceId)>0)
- {
- if(pdtSelect.bSort)
- {
- if(Join_GetDataType(pdtSelect.iSourceId)==STRING_DATA)
- szValue = Join_GetStringFromSortedIndex(pdtSelect.iSourceId,pdtSelect.iRowSelected);
- else if(Join_GetDataType(pdtSelect.iSourceId)==INT_DATA)
- //use localized string
- szValue = Join_GetStringFromKey(g_oLocalJoins.m_iLocalizedString,Join_GetIntFromSortedIndex(pdtSelect.iSourceId,pdtSelect.iRowSelected));
- else println("Error SourceID is not string or localized string");
- }
- else
- {
- if(Join_GetDataType(pdtSelect.iSourceId)==STRING_DATA)
- szValue = Join_GetStringFromIndex(pdtSelect.iSourceId,pdtSelect.iRowSelected);
- else if(Join_GetDataType(pdtSelect.iSourceId)==INT_DATA)
- //use localized string
- szValue = Join_GetStringFromKey(g_oLocalJoins.m_iLocalizedString,Join_GetIntFromIndex(pdtSelect.iSourceId,pdtSelect.iRowSelected));
- else println("Error SourceID is not string or localized string");
- }
- }
- else
- szValue = "None";
-
- if(pdtSelect.iEditbox)
- pdtSelect.gcEditBox<<EbCText(szValue);
- else
- {
- pdtSelect.gcCaption<<Caption(szValue);
- }
-
- // Save Height
- pdtSelect.iHeight = _iY;
-
- // Stretch
- StretchTo(composite,_iX+sx,sy_button);
-
- return composite;
- }
-
- /*
- * Function : On Click Select
- */
- func void Select_OnClick(Gui_Component _poComponent)
- {
- var Gui_Component pthis;
- var Gui_dtSelect pdtSelect;
-
- // Get This
- pthis = GetThis();
- // Get Data
- pdtSelect = GetData(pthis);
-
- // Show or Hide Select List
- if (pdtSelect.bListHidden == true)
- {
- pthis<<ShowSelectList();
- }
- else
- {
- pthis<<HideSelectList();
- }
- }
-
- /*
- * Function : Show Select List
- */
- func void Select_ShowList()
- {
- var Gui_Component pthis;
- var Gui_Component pparent;
- var Gui_Component gcListTable;
- var Gui_Component gcListColumn;
- var Gui_Component gcListCell;
- var Gui_dtSelect pdtSelect;
- var i32x iX, iY, iSxEditBox, iSyEditBox, iSxButton,i, iNumRows,iSyButton;
-
-
- // Get This
- pthis = GetThis();
- // Get Data
- pdtSelect = GetData(pthis);
-
- if(pdtSelect.iEditbox)
- {
- iSyEditBox = SizeY(pdtSelect.gcEditBox);
- iSxEditBox = SizeX(pdtSelect.gcEditBox);
- }
- else
- {
- iSyEditBox = SizeY(pdtSelect.gcCaption);
- iSxEditBox = SizeX(pdtSelect.gcCaption);
- }
-
- if(pdtSelect.iShowList)
- {
- iSxButton = SizeX(pdtSelect.gcButtonClose);
- iSyButton = SizeY(pdtSelect.gcButtonClose);
-
- // Change button
- pdtSelect.gcButtonOpen<<Show();
- pdtSelect.gcButtonClose<<Hide();
- }
- else
- {
- iSxButton = 0;
- iSyButton = 0;
- }
- if(iSyButton<iSyEditBox)
- iSyButton= iSyEditBox;
-
-
- // Create List
- if (pdtSelect.gcList)
- {
- DeleteComponent(pdtSelect.gcList);
- pdtSelect.gcList = NULL;
- }
- pdtSelect.gcList = NewWindow(iSxEditBox+iSxButton,pdtSelect.iHeight);
-
- // Init
- i = 0;
- gcListTable = NewTable();
- gcListColumn = NewColumn(iSxEditBox);
- iNumRows = Join_GetNumRows(pdtSelect.iSourceId);
- while (i < iNumRows) {
- gcListCell = NewTextCell(pdtSelect.iSourceId);
- gcListCell<<CellUpdate(i);
- gcListColumn<<AddCell(gcListCell);
- i = i + 1;
- }
-
- // Mount
- gcListTable<<AddColumn(gcListColumn);
- pdtSelect.gcList<<WindowMount(gcListTable);
- MountComponent(pthis,pdtSelect.gcList);
-
- // Give Focus
- GiveFocus(pdtSelect.gcList);
-
- // Move
- MoveTo(pdtSelect.gcList,0,iSyButton);
-
- pdtSelect.bListHidden = false;
-
- // calcul new size of select
- iX = iSxEditBox + iSxButton;
- iY = iSyEditBox + pdtSelect.iHeight;
-
- // Stretch
- StretchTo(pthis,iX,iY);
-
- pparent = GetParent(pthis);
- if(pparent)
- pparent<<WindowUpdate();
- }
-
- /*
- * Function : Hide Select List
- */
- func void Select_HideList()
- {
- var Gui_Component pthis,pparent;
- var Gui_dtSelect pdtSelect;
- var i32x iX, iY,iSxButton,iSxEditBox,iSyEditBox;
-
-
- // Get This
- pthis = GetThis();
- // Get Data
- pdtSelect = GetData(pthis);
-
- if (pdtSelect.gcList)
- {
- pdtSelect.gcList<<Hide();
- }
-
- pdtSelect.bListHidden = true;
-
- if(pdtSelect.iShowList)
- {
- iSxButton = SizeX(pdtSelect.gcButtonClose);
- pdtSelect.gcButtonOpen<<Hide();
- pdtSelect.gcButtonClose<<Show();
- }
- else
- {
- iSxButton = 0;
- }
-
- if(pdtSelect.iEditbox)
- {
- iSyEditBox = SizeY(pdtSelect.gcEditBox);
- iSxEditBox = SizeX(pdtSelect.gcEditBox);
- }
- else
- {
- iSyEditBox = SizeY(pdtSelect.gcCaption);
- iSxEditBox = SizeX(pdtSelect.gcCaption);
- }
-
- // Calculate new size
- iX = iSxEditBox + iSxButton;
- iY = iSyEditBox;
-
- StretchTo(pthis,iX,iY);
- pparent = GetParent(pthis);
- if(pparent)
- pparent<<WindowUpdate();
- }
-
- /*
- * Function : On Cell Select Click
- */
- func void Select_OnCellSelect(i32x _iRow)
- {
- var Gui_Component pthis, parent;
- var Gui_dtSelect pdtSelect;
- var szx szValue;
- var f32x fValue;
- var i32x iValue;
-
- // Get This
- pthis = GetThis();
- parent = GetParent(pthis);
- // Get Data
- pdtSelect = GetData(pthis);
-
- // Retrieve text
- if(pdtSelect.bSort)
- {
- if(Join_GetDataType(pdtSelect.iSourceId)==STRING_DATA)
- szValue = Join_GetStringFromSortedIndex(pdtSelect.iSourceId,_iRow);
- else if(Join_GetDataType(pdtSelect.iSourceId)==INT_DATA)
- //use localized string
- szValue = Join_GetStringFromKey(g_oLocalJoins.m_iLocalizedString,Join_GetIntFromSortedIndex(pdtSelect.iSourceId,_iRow));
- else println("Error SourceID is not string or localized string");
- }
- else
- {
- if(Join_GetDataType(pdtSelect.iSourceId)==STRING_DATA)
- szValue = Join_GetStringFromIndex(pdtSelect.iSourceId,_iRow);
- else if(Join_GetDataType(pdtSelect.iSourceId)==INT_DATA)
- //use localized string
- szValue = Join_GetStringFromKey(g_oLocalJoins.m_iLocalizedString,Join_GetIntFromIndex(pdtSelect.iSourceId,_iRow));
- else println("Error SourceID is not string or localized string");
- }
-
- if(pdtSelect.iEditbox)
- {
- pdtSelect.gcEditBox<<EbCText(szValue);
- }
- else
- {
- println("pdtSelect.gcCaption<<Caption");
- println(szValue);
-
- pdtSelect.gcCaption<<Caption(szValue);
- }
-
-
- // Hide Select List
- if (pdtSelect.bListHidden == false) pthis<<HideSelectList();
-
- // cellselect => parent if change
- if(!pdtSelect.bQuiet)
- {
- if(pdtSelect.iReturnId==0)
- {
- parent<<SelectIndex(pthis,_iRow);
- }
- else
- {
- if(Join_GetDataType(pdtSelect.iReturnId)==INT_DATA)
- {
- if(pdtSelect.bSort)
- iValue = Join_GetIntFromSortedIndex(pdtSelect.iReturnId,_iRow);
- else
- iValue = Join_GetIntFromIndex(pdtSelect.iReturnId,_iRow);
- parent<<SelectInt(pthis,iValue);
- }
- else if(Join_GetDataType(pdtSelect.iReturnId)==FLOAT_DATA)
- {
- if(pdtSelect.bSort)
- fValue = Join_GetFloatFromSortedIndex(pdtSelect.iReturnId,_iRow);
- else
- fValue = Join_GetFloatFromIndex(pdtSelect.iReturnId,_iRow);
- parent<<SelectFloat(pthis,fValue);
- }
- else if(Join_GetDataType(pdtSelect.iReturnId)==STRING_DATA)
- {
- if(pdtSelect.bSort)
- szValue = Join_GetStringFromSortedIndex(pdtSelect.iReturnId,_iRow);
- else
- szValue = Join_GetStringFromIndex(pdtSelect.iReturnId,_iRow);
- parent<<SelectString(pthis,szValue);
- }
- else
- {
- print("Error : unknown type for CellSelect:");
- print(itoa(Join_GetDataType(pdtSelect.iReturnId)));
- print(".Return join ID is:");
- println(itoa(pdtSelect.iReturnId));
- }
- }
- }
- pdtSelect.iRowSelected = _iRow;
- }
- /*
- func i32x Select_OnGainFocus()
- {
- var Gui_Component pthis;
- var Gui_dtSelect pdtSelect;
-
- // Get This
- pthis = GetThis();
- // Get Data
- pdtSelect = GetData(pthis);
-
- // Show open button
- pdtSelect.gcButtonOpen<<Show();
- }
- */
- func i32x Select_OnLoseFocus()
- {
- var Gui_Component pthis;
- var Gui_dtSelect pdtSelect;
-
- // Get This
- pthis = GetThis();
- // Get Data
- pdtSelect = GetData(pthis);
-
- // Hide Select List
- if (pdtSelect.bListHidden == false) pthis<<HideSelectList();
- // Hide two button button
- // pdtSelect.gcButtonOpen<<Hide();
- // pdtSelect.gcButtonClose<<Hide();
- }
-
- func i32x Select_OnSelectPrevious()
- {
- var Gui_Component pthis;
- var Gui_dtSelect pdtSelect;
- var i32x iNewSelectedRow;
-
- // Get This
- pthis = GetThis();
- // Get Data
- pdtSelect = GetData(pthis);
-
- if(pdtSelect.iRowSelected>0)
- {
- iNewSelectedRow=pdtSelect.iRowSelected-1;
- Select_OnCellSelect(iNewSelectedRow);
- }
- }
-
- func i32x Select_OnSelectNext()
- {
- var Gui_Component pthis;
- var Gui_dtSelect pdtSelect;
- var i32x iNewSelectedRow;
-
- // Get This
- pthis = GetThis();
- // Get Data
- pdtSelect = GetData(pthis);
-
- if(pdtSelect.iRowSelected<Join_GetNumRows(pdtSelect.iSourceId)-1)
- {
- iNewSelectedRow=pdtSelect.iRowSelected+1;
- Select_OnCellSelect(iNewSelectedRow);
- }
- }
-
- func i32x Select_OnQuietSelectIndex(Gui_Component _pSender,i32x _iIndex)
- {
- var Gui_Component pthis;
- var Gui_dtSelect pdtSelect;
- var i32x iNewSelectedRow;
-
- // Get This
- pthis = GetThis();
- // Get Data
- pdtSelect = GetData(pthis);
-
- if(_iIndex>=0&&_iIndex<Join_GetNumRows(pdtSelect.iSourceId))
- {
- pdtSelect.bQuiet = true;
- Select_OnCellSelect(_iIndex);
- pdtSelect.bQuiet = false;
- }
- }
-
-
- func i32x Select_OnSelectNone (szx _szTxt)
- {
- var Gui_Component pthis;
- var Gui_dtSelect pdtSelect;
-
- // Get This
- pthis = GetThis();
- // Get Data
- pdtSelect = GetData(pthis);
-
- pdtSelect.iRowSelected = -1;
-
- if(pdtSelect.iEditbox)
- {
- pdtSelect.gcEditBox<<EbCText(_szTxt);
- }
- else
- {
- pdtSelect.gcCaption<<Caption(_szTxt);
- }
- }
-